package com.daiyang.librarymanagementsystem2.controller_test;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PropertiesController {
    @Value("${mykey.key1}")
    private String key;

    @Value("${string.value}")
    private String Hello;

    @Value("${boolean.value}")
    private boolean b_true;

    @Value("${boolean.value1}")
    private boolean b_false;
    @Value("${int.value}")
    private Integer T_10;

    @Value("${null.value}")
    private String NUll;

    @Value("${empty.value}")
    private String empty;


    @RequestMapping("/key")
    public String key() {
        System.out.println(Hello);
        System.out.println(b_true);
        System.out.println(b_false);
        System.out.println(T_10);
        System.out.println(NUll);
        System.out.println(empty);
        return "读到的值"+key;
    }


}
